import java.io.IOException;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class ExecuteBatch implements Job {
	public static String path;

	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		try {
			 String[] command = { "cmd.exe", "/C",
			 "Start",context.getJobDetail().getJobDataMap().getString("path")};
			System.out.println("execute batch file"
					+ context.getJobDetail().getJobDataMap().getString("path"));
			Process p = Runtime.getRuntime().exec(command);
		} catch (IOException ex) {
		}

	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

}
